package com.huahua.myIdea.service.serviceImpl;

import com.huahua.myIdea.condition.MQCondition;
import com.huahua.myIdea.config.MyConfiguration;
import com.huahua.myIdea.service.IBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Conditional;
import org.springframework.stereotype.Service;

@Service
@Conditional(MQCondition.class)
public class MQServiceImpl implements IBaseService {
    @Autowired
    MyConfiguration myConfiguration;

    @Override
    public void send() {
        System.out.println("调用MQ接口，发送数据！");
        myConfiguration.init("-------------MQ-----------");
    }
}
